﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Kaleta.Network;

namespace StarWarsGame
{
    public class Bullet : DistributableObject
    {
        public Bullet(bool oldBullet)
        { }
        public Bullet()
        {
            _rotationDistributable = DistributableProperty<Quaternion>.Register("bulletRotation", this);         
            _positionDistributable = DistributableProperty<Vector3>.Register("bulletPosition", this);
            _ownerDistributable = DistributableProperty<int>.Register("bulletOwner", this);
        
        }

        private DistributableProperty<Quaternion> _rotationDistributable;
        private DistributableProperty<Vector3> _positionDistributable;
        private DistributableProperty<int> _ownerDistributable;  

        public Vector3 bulletPosition { get; set; }  
        public Quaternion bulletRotation { get; set; }
        public int bulletOwner { get; set; }
 
        public Quaternion locRotation
        {
            get
            {
                return _rotationDistributable.GetValue();
            }
            set
            {
                _rotationDistributable.SetValue(value);
            }
        }      
        public Vector3 locPosition
        {
            get
            {
                return _positionDistributable.GetValue();
            }
            set
            {
                _positionDistributable.SetValue(value);
            }
        }
        public int locOwner
        {
            get
            {
                return _ownerDistributable.GetValue();
            }
            set
            {
                _ownerDistributable.SetValue(value);
            }
        }
     
    }
}
